package com.itestor.iptv.modules.alert.vo;

import java.io.File;
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;

import com.itestor.iptv.modules.alert.domain.RobotLog;
import com.itestor.iptv.modules.common.domain.RobotVideoPic;
import com.itestor.iptv.modules.ne.domain.RobotFileInfo;

/**
 * 
 * @author Mr.li
 * 
 */
public class RobotLogDetailBean implements Serializable {
    /**
     * 
     */
    private static SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

    private Long logTime;

    private String irCommand;

    private String srcIp;

    private Integer srcPort;

    private String destIp;

    private Integer destPort;

    private Integer rtplost;

    private Integer rtpse;

    private Float df;

    private Long mdimlr;

    private Long bitRate;

    private Float portBitRate;

    private Float volume;

    private Long power;

    private String videoPicFile;

    private String userQoe;

    private String avFaultDesc;

    
    private RobotFileInfo robotFileInfo;
    
    private RobotLog robotlog;
    
    private RobotVideoPic robotVideoPic;
    
    /**
     * 构造器
     */
    public RobotLogDetailBean() {

    }
    
    /**
     * 构造器
     */
    public RobotLogDetailBean(RobotFileInfo robotFileInfo,RobotVideoPic robotVideoPic) {
        this.robotFileInfo=robotFileInfo;        
        this.robotVideoPic=robotVideoPic;
    }

    /**
     * 构造器
     * @param logTime
     * @param irCommand
     * @param srcIp
     * @param srcPort
     * @param destIp
     * @param destPort
     * @param rtplost
     * @param rtpse
     * @param df
     * @param mdimlr
     * @param bitRate
     * @param portBitRate
     * @param volume
     * @param power
     * @param avFaultDesc
     * @param userQoe
     * @param videoPicFile
     */
    public RobotLogDetailBean(Long logTime, String irCommand, String srcIp,
            Integer srcPort, String destIp, Integer destPort, Integer rtplost,
            Integer rtpse, Float df, Long mdimlr, Long bitRate,
            Float portBitRate, Float volume, Long power, String avFaultDesc,
            String userQoe, String videoPicFile) {

        this.logTime = logTime;
        this.irCommand = irCommand;
        this.srcIp = srcIp;
        this.srcPort = srcPort;
        this.destIp = destIp;
        this.destPort = destPort;
        this.rtplost = rtplost;
        this.rtpse = rtpse;
        this.df = df;
        this.mdimlr = mdimlr;
        this.bitRate = bitRate;
        this.portBitRate = portBitRate;
        this.volume = volume;
        this.power = power;
        this.avFaultDesc = avFaultDesc;
        this.userQoe = userQoe;
        this.videoPicFile = videoPicFile;
    }

    public Long getLogTime() {
        return logTime;
    }

    public String getIrCommand() {
        return irCommand;
    }

    public String getSrcIp() {
        return srcIp;
    }

    public Integer getSrcPort() {
        return srcPort;
    }

    public String getDestIp() {
        return destIp;
    }

    public Integer getDestPort() {
        return destPort;
    }

    public Integer getRtplost() {
        return rtplost;
    }

    public Integer getRtpse() {
        return rtpse;
    }

    public Float getDf() {
        return df;
    }

    public Long getMdimlr() {
        return mdimlr;
    }

    public Long getBitRate() {
        return bitRate;
    }

    public Float getPortBitRate() {
        return portBitRate;
    }

    public Float getVolume() {
        return volume;
    }

    public Long getPower() {
        return power;
    }

    public String getVideoPicFile() {
        return videoPicFile;
    }

    public String getUserQoe() {
        return userQoe;
    }

    public String getAvFaultDesc() {
        return avFaultDesc;
    }

    public void setLogTime(Long pLogTime) {
        logTime = pLogTime;
    }

    public void setIrCommand(String pIrCommand) {
        irCommand = pIrCommand;
    }

    public void setSrcIp(String pSrcIp) {
        srcIp = pSrcIp;
    }

    public void setSrcPort(Integer pSrcPort) {
        srcPort = pSrcPort;
    }

    public void setDestIp(String pDestIp) {
        destIp = pDestIp;
    }

    public void setDestPort(Integer pDestPort) {
        destPort = pDestPort;
    }

    public void setRtplost(Integer pRtplost) {
        rtplost = pRtplost;
    }

    public void setRtpse(Integer pRtpse) {
        rtpse = pRtpse;
    }

    public void setDf(Float pDf) {
        df = pDf;
    }

    public void setMdimlr(Long pMdimlr) {
        mdimlr = pMdimlr;
    }

    public void setBitRate(Long pBitRate) {
        bitRate = pBitRate;
    }

    public void setPortBitRate(Float pPortBitRate) {
        portBitRate = pPortBitRate;
    }

    public void setVolume(Float pVolume) {
        volume = pVolume;
    }

    public void setPower(Long pPower) {
        power = pPower;
    }

    public void setVideoPicFile(String pVideoPicFile) {
        videoPicFile = pVideoPicFile;
    }

    public void setUserQoe(String pUserQoe) {
        userQoe = pUserQoe;
    }

    public void setAvFaultDesc(String pAvFaultDesc) {
        avFaultDesc = pAvFaultDesc;
    }
    
    /**
     * 
     * @return
     */
    public String getLogTimeStr(){
        return sdf.format(new Date(this.logTime));        
    }

    public void setRobotFileInfo(RobotFileInfo pRobotFileInfo) {
        robotFileInfo = pRobotFileInfo;
    }

    public void setRobotlog(RobotLog pRobotlog) {
        robotlog = pRobotlog;
    }

    public void setRobotVideoPic(RobotVideoPic pRobotVideoPic) {
        robotVideoPic = pRobotVideoPic;
    }

    public RobotFileInfo getRobotFileInfo() {
        return robotFileInfo;
    }

    public RobotLog getRobotlog() {
        return robotlog;
    }

    public RobotVideoPic getRobotVideoPic() {
        return robotVideoPic;
    }

    public String getRemoteVideoFileURL() {
        return robotFileInfo.getWebHost()+robotFileInfo.getVideoPicUrlDir()+robotVideoPic.getVideoPicFile();      
    }
    
    public String getLocalVideoPicFileURL() {
        return robotFileInfo.getVideoPicFileDir()+File.separator+robotVideoPic.getVideoPicFile();        
    }
    
    
}
